/**
 * 
 */
package com.onlinemathuracrud.model;

import java.util.HashSet;
import java.util.Set;

import javax.persistence.AttributeOverride;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.JoinTable;
import javax.persistence.OneToMany;
import javax.persistence.Table;

import org.hibernate.annotations.ForeignKey;

/**
 * @author Amit Kashyap
 * @createdDate Aug 14, 2013
 * @createdTime 1:17:15 AM
 */
@Entity
@Table(name="ghatorkund")
@AttributeOverride( name="id", column = @Column(name="ghatorkund_id") )
public class GhatOrKund extends ReligiousItem{

	/**
	 * 
	 */
	private static final long serialVersionUID = -5527073886000846193L;

	@OneToMany(cascade = CascadeType.ALL , fetch = FetchType.LAZY)
	@ForeignKey(name="fk_ghatorkund_id" , inverseName="fk_image_id")
	@JoinTable(name = "ghatorkund_image", joinColumns = { @JoinColumn(name = "ghatorkund_id")}, inverseJoinColumns = { @JoinColumn(name = "image_id") })
	private Set<Image> ghatOrKundImages = new HashSet<Image>(0);

	
	@OneToMany(cascade = CascadeType.ALL , fetch = FetchType.LAZY)
	@ForeignKey(name="fk_ghatorkund_id" , inverseName="fk_video_id")
	@JoinTable(name = "ghatorkund_video", joinColumns = { @JoinColumn(name = "ghatorkund_id")}, inverseJoinColumns = { @JoinColumn(name = "video_id") })
	private Set<Video> ghatOrKundVideos = new HashSet<Video>(0);

}
